package com.easy.query.test.dameng.entity.proxy;

import com.easy.query.core.expression.parser.core.available.TableAvailable;
import com.easy.query.core.proxy.AbstractProxyEntity;
import com.easy.query.core.proxy.SQLColumn;
import com.easy.query.core.proxy.SQLSelectAsExpression;
import com.easy.query.core.proxy.fetcher.AbstractFetcher;
import com.easy.query.core.proxy.core.EntitySQLContext;
import com.easy.query.test.dameng.entity.DamengMyTopic;
import com.easy.query.core.proxy.columns.types.SQLStringTypeColumn;
import com.easy.query.core.proxy.columns.types.SQLIntegerTypeColumn;
import com.easy.query.core.proxy.columns.types.SQLLocalDateTimeTypeColumn;
import com.easy.query.core.proxy.columns.SQLNavigateColumn;
import com.easy.query.core.proxy.columns.SQLManyQueryable;
import com.easy.query.core.proxy.columns.types.SQLAnyTypeColumn;

/**
 * this file automatically generated by easy-query, don't modify it
 * 当前文件是easy-query自动生成的请不要随意修改
 * 如果出现属性冲突请使用@ProxyProperty进行重命名
 *
 * @author easy-query
 */
public class DamengMyTopicProxy extends AbstractProxyEntity<DamengMyTopicProxy, DamengMyTopic> {

    private static final Class<DamengMyTopic> entityClass = DamengMyTopic.class;

    public static final DamengMyTopicProxy TABLE = createTable().createEmpty();

    public static DamengMyTopicProxy createTable() {
        return new DamengMyTopicProxy();
    }

    public DamengMyTopicProxy() {
    }

    /**
     * {@link DamengMyTopic#getId}
     */
    public SQLStringTypeColumn<DamengMyTopicProxy> id() {
        return getStringTypeColumn("id");
    }

    /**
     * {@link DamengMyTopic#getStars}
     */
    public SQLIntegerTypeColumn<DamengMyTopicProxy> stars() {
        return getIntegerTypeColumn("stars");
    }

    /**
     * {@link DamengMyTopic#getTitle}
     */
    public SQLStringTypeColumn<DamengMyTopicProxy> title() {
        return getStringTypeColumn("title");
    }

    /**
     * {@link DamengMyTopic#getCreateTime}
     */
    public SQLLocalDateTimeTypeColumn<DamengMyTopicProxy> createTime() {
        return getLocalDateTimeTypeColumn("createTime");
    }

    /**
     * {@link DamengMyTopic#getMyTopics}
     */
    public SQLManyQueryable<DamengMyTopicProxy, com.easy.query.test.dameng.entity.proxy.DamengMyTopicProxy, com.easy.query.test.dameng.entity.DamengMyTopic> myTopics() {
        return getNavigateMany("myTopics", new com.easy.query.test.dameng.entity.proxy.DamengMyTopicProxy());
    }


    @Override
    public Class<DamengMyTopic> getEntityClass() {
        return entityClass;
    }

    @Override
    public DamengMyTopicProxy createNew() {
        return createTable();
    }


    /**
     * 数据库列的简单获取
     *
     * @return
     */
    public DamengMyTopicProxyFetcher FETCHER = new DamengMyTopicProxyFetcher(this, null, SQLSelectAsExpression.empty);


    public static class DamengMyTopicProxyFetcher extends AbstractFetcher<DamengMyTopicProxy, DamengMyTopic, DamengMyTopicProxyFetcher> {

        public DamengMyTopicProxyFetcher(DamengMyTopicProxy proxy, DamengMyTopicProxyFetcher prev, SQLSelectAsExpression sqlSelectAsExpression) {
            super(proxy, prev, sqlSelectAsExpression);
        }


        /**
         * {@link DamengMyTopic#getId}
         */
        public DamengMyTopicProxyFetcher id() {
            return add(getProxy().id());
        }

        /**
         * {@link DamengMyTopic#getStars}
         */
        public DamengMyTopicProxyFetcher stars() {
            return add(getProxy().stars());
        }

        /**
         * {@link DamengMyTopic#getTitle}
         */
        public DamengMyTopicProxyFetcher title() {
            return add(getProxy().title());
        }

        /**
         * {@link DamengMyTopic#getCreateTime}
         */
        public DamengMyTopicProxyFetcher createTime() {
            return add(getProxy().createTime());
        }


        @Override
        protected DamengMyTopicProxyFetcher createFetcher(DamengMyTopicProxy cp, AbstractFetcher<DamengMyTopicProxy, DamengMyTopic, DamengMyTopicProxyFetcher> prev, SQLSelectAsExpression sqlSelectExpression) {
            return new DamengMyTopicProxyFetcher(cp, this, sqlSelectExpression);
        }
    }


    public static final class Fields {
        public static final String id = "id";
        public static final String stars = "stars";
        public static final String title = "title";
        public static final String createTime = "createTime";

        private Fields() {
        }
    }
}
